<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>embedme: EventManager类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.8 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li class="current"><a href="annotated.html"><span>类</span></a></li>
      <li><a href="files.html"><span>文件</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>类列表</span></a></li>
      <li><a href="classes.html"><span>类索引</span></a></li>
      <li><a href="hierarchy.html"><span>类继承关系</span></a></li>
      <li><a href="functions.html"><span>类成员</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="class_event_manager-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">EventManager类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>Observer模式实现的事件管理器.  
 <a href="class_event_manager.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_event_8h_source.html">Event.h</a>&gt;</code></p>
<div class="dynheader">
类 EventManager 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_event_manager.png" usemap="#EventManager_map" alt=""/>
  <map id="EventManager_map" name="EventManager_map">
<area href="class_runnable_protocol.html" title="线程接口 " alt="RunnableProtocol" shape="rect" coords="0,0,112,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a89099b22114f158b5c530edfea52371d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_event_manager.html#a89099b22114f158b5c530edfea52371d">EventManager</a> ()</td></tr>
<tr class="memdesc:a89099b22114f158b5c530edfea52371d"><td class="mdescLeft">&#160;</td><td class="mdescRight">EventManager构造函数  <a href="#a89099b22114f158b5c530edfea52371d">更多...</a><br /></td></tr>
<tr class="separator:a89099b22114f158b5c530edfea52371d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e43e8b165b54f75e9c005cf5b04ade7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_event_manager.html#a2e43e8b165b54f75e9c005cf5b04ade7">~EventManager</a> ()</td></tr>
<tr class="memdesc:a2e43e8b165b54f75e9c005cf5b04ade7"><td class="mdescLeft">&#160;</td><td class="mdescRight">EventManager析构函数  <a href="#a2e43e8b165b54f75e9c005cf5b04ade7">更多...</a><br /></td></tr>
<tr class="separator:a2e43e8b165b54f75e9c005cf5b04ade7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a355cb858f96db9e24b4a74ea6c85ba88"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_event_manager.html#a355cb858f96db9e24b4a74ea6c85ba88">registerHandler</a> (<a class="el" href="class_event_handler.html">EventHandler</a> *pEvtHandler)</td></tr>
<tr class="memdesc:a355cb858f96db9e24b4a74ea6c85ba88"><td class="mdescLeft">&#160;</td><td class="mdescRight">注册事件处理者  <a href="#a355cb858f96db9e24b4a74ea6c85ba88">更多...</a><br /></td></tr>
<tr class="separator:a355cb858f96db9e24b4a74ea6c85ba88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6428e8394e4f1ba156654af352448f3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_event_manager.html#ac6428e8394e4f1ba156654af352448f3">unregisterHandler</a> (<a class="el" href="class_event_handler.html">EventHandler</a> *pEvtHandler)</td></tr>
<tr class="memdesc:ac6428e8394e4f1ba156654af352448f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">取消注册事件处理者到事件中心  <a href="#ac6428e8394e4f1ba156654af352448f3">更多...</a><br /></td></tr>
<tr class="separator:ac6428e8394e4f1ba156654af352448f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39905fd1ae46b83981aa369d1c834ecf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_event_manager.html#a39905fd1ae46b83981aa369d1c834ecf">postEvent</a> (<a class="el" href="class_event.html">Event</a> &amp;evt)</td></tr>
<tr class="memdesc:a39905fd1ae46b83981aa369d1c834ecf"><td class="mdescLeft">&#160;</td><td class="mdescRight">发送事件  <a href="#a39905fd1ae46b83981aa369d1c834ecf">更多...</a><br /></td></tr>
<tr class="separator:a39905fd1ae46b83981aa369d1c834ecf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:aef79fefe8afd354f1fa02e7bd4e87052"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_event_manager.html">EventManager</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_event_manager.html#aef79fefe8afd354f1fa02e7bd4e87052">getInstance</a> ()</td></tr>
<tr class="memdesc:aef79fefe8afd354f1fa02e7bd4e87052"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取EventManager单例  <a href="#aef79fefe8afd354f1fa02e7bd4e87052">更多...</a><br /></td></tr>
<tr class="separator:aef79fefe8afd354f1fa02e7bd4e87052"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>Observer模式实现的事件管理器. </p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a class="anchor" id="a89099b22114f158b5c530edfea52371d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EventManager::EventManager </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>EventManager构造函数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>none </dd></dl>
<dl class="section note"><dt>注解</dt><dd>要使用事件必须要有EventCenter,构造对象是启动事件中心线程 </dd></dl>

</div>
</div>
<a class="anchor" id="a2e43e8b165b54f75e9c005cf5b04ade7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EventManager::~EventManager </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>EventManager析构函数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>none </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a class="anchor" id="aef79fefe8afd354f1fa02e7bd4e87052"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="class_event_manager.html">EventManager</a>* EventManager::getInstance </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取EventManager单例 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">void</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>EventManager* </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a39905fd1ae46b83981aa369d1c834ecf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void EventManager::postEvent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_event.html">Event</a> &amp;&#160;</td>
          <td class="paramname"><em>evt</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>发送事件 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">evt</td><td>事件 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>void </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a355cb858f96db9e24b4a74ea6c85ba88"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void EventManager::registerHandler </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_event_handler.html">EventHandler</a> *&#160;</td>
          <td class="paramname"><em>pEvtHandler</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>注册事件处理者 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">pEvtHandler</td><td>事件处理者 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>void </dd></dl>
<dl class="section note"><dt>注解</dt><dd>注册后,事件处理者需要实现handleEvent来处理事件 </dd></dl>

</div>
</div>
<a class="anchor" id="ac6428e8394e4f1ba156654af352448f3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void EventManager::unregisterHandler </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_event_handler.html">EventHandler</a> *&#160;</td>
          <td class="paramname"><em>pEvtHandler</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>取消注册事件处理者到事件中心 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">pEvtHandler</td><td>事件处理者 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>void </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>libemb/inc/<a class="el" href="_event_8h_source.html">Event.h</a></li>
<li>libemb/src/Event.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2016年 七月 7日 星期四 19:49:38 , 为 embedme使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>
